package mt.Junit;
import static org.junit.Assert.*;

import mt.Order;
import mt.comm.ClientMessage;

import org.junit.Before;
import org.junit.Test;


public class JUnitClientMessage {

	private ClientMessage climes;
	private Order or;	
	private String error;
	
	@Before
	public void setUp() {
		error="No error";
		or = Order.createBuyOrder("Joana", "Google", 50, 15);
		climes = new ClientMessage(ClientMessage.Type.ORDER, or, error);
	}

	@Test
	public void test() {
		assertEquals(climes.getType(),ClientMessage.Type.ORDER);
		assertEquals(climes.getOrder(),or);
		assertEquals(climes.getError(), error);
	}
}
